package com.winter.main.config;

import com.winter.main.filter.MainFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import sun.applet.Main;

/**
 * Desc:
 * Author: dushuang
 * Date: Create in 2018/5/13
 */
@Configuration
public class ShiroFilterRegisterConfig {

    @Bean
    public MainFilter mainFilter(){
        MainFilter mainFilter = new MainFilter();
        return mainFilter;
    }

    @Bean
    public FilterRegistrationBean mainFilterRegistration(MainFilter filter) {
        FilterRegistrationBean registration = new FilterRegistrationBean(filter);
        registration.setEnabled(false);
        return registration;
    }

}
